/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package expression;

import core.Node;
import core.UnsatException;
import domain.Domain;

/**
 *
 * @author ddoose
 */
public class Value extends IntExpr {
    
    public Value(Node c, int v) {
        super(c);
        current = new Domain(v);
        target = new Domain(v);
    }
    
    public boolean same(IntExpr i) {
        return (i instanceof Value) && current.equals(i.current);
    }
    
    public void propagate() throws UnsatException {
    }
    
    public void eval() throws UnsatException {
    }

    public boolean reduce() {
        return false;
    }
    
    public Value clone(Node n) {
        Value value = new Value(n, current.getValue());
        value.clone(this);
        return value;
    }

    public String toString() {
        return current.toString();
    }
    
    public String pretty() {
        return id + "\t" + toString();
    }
}
